package com.yijinsuo.activity;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;

import com.yijinsuo.R;
import com.yijinsuo.base.BaseActivity;
import com.yijinsuo.view.TitleBar;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class AboutActivity extends BaseActivity {
    @Bind(R.id.titlebar)
    TitleBar titlebar;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_about);
        ButterKnife.bind(this);
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initTitle() {
        titlebar.setTitleBar(R.drawable.back_selector, "关于我们", 0);
        titlebar.setTitleBackgroundColor(getResources().getColor(R.color.dan_hong_3));
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void setData() {

    }


    @OnClick({R.id.titlebar_iv_back, R.id.lly_ymjs, R.id.lly_aqbz, R.id.lly_xszy, R.id.lly_kfrx, R.id.lly_wxgzq, R.id.lly_gfqqq})
    public void widgetClick(View view) {
        switch (view.getId()) {

            case R.id.titlebar_iv_back:

                finish();

                break;

            case R.id.lly_ymjs:    //

                startActivity(new Intent(AboutActivity.this, YuMiIntroduceActivity.class));

                break;


            case R.id.lly_aqbz:


                startActivity(new Intent(AboutActivity.this, YuMiSecurityActivity.class));


                break;
            case R.id.lly_xszy:
                startActivity(new Intent(AboutActivity.this, NewGuideActivity.class));

                break;
            case R.id.lly_kfrx:   //客服热线

                String phoneNumber="4008367566";

                //复制号码到拨号键盘
                Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + phoneNumber));
                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(intent);


                //直接拨打
//                Intent intentPhone = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber));
//                startActivity(intentPhone);

                //2、跳转到联系人页面，使用一下代码：
//                Intent intentPhone = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber));
//                startActivity(intentPhone);

                break;
            case R.id.lly_wxgzq:
                break;
            case R.id.lly_gfqqq:
                break;

            default:
        }
    }
}
